# from typing import List
# class Solution:
#   def subsets(self, nums: List[int]) -> List[List[int]]:
#     res = [[]]
#     for i in nums:
#       res = res + [[i]+ num for num in res]
#     return res

def subsets(nums):
  res = [[]]
  for i in nums:
    res = res + [[i]+ num for num in res]
  return res

r = subsets([1,2,3,4])

print(r)
